﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="PhotoList.aspx.vb" Inherits="FishTank.PhotoList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="alternate" type="application/rss+xml" href="/Pages/PhotoRSS.aspx" title="RSS feed" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="rss">
        <a href="/Pages/PhotoRSS.aspx"><asp:Image ID="rssImg" runat="server" ImageUrl="~/Images/rss.png" /></a>
    </div>

    <h1>Member Photos</h1>
    
    <div class="search">
        Search by 
        <asp:DropDownList ID="SearchType" runat="server">
            <asp:ListItem Value="Title">Title</asp:ListItem>
            <asp:ListItem Value="MemberUserName">Member Username</asp:ListItem>
            <asp:ListItem Value="MemberFullName">Member Fullname</asp:ListItem>
        </asp:DropDownList>
        <asp:TextBox ID="SearchBox" runat="server" AutoPostBack="True"></asp:TextBox>
        <asp:Button ID="SearchButton" runat="server" Text="Go" />
        <asp:Button ID="ResetButton" runat="server" Text="Reset" />
    </div>
    
    <p>
        <asp:ListView ID="ListGrid" runat="server" GroupItemCount="4">
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <ItemTemplate>
                <td runat="server">
                    <div class="thumbnail">
                        <a href='/Pages/PhotoDetail.aspx?ID=<%# Eval("ID") %>'>
                        <asp:Image ID="PhotoImage" runat="server"
                                    ImageUrl='<%# GetPhotoThumbPath(Eval("ImagePath")) %>'
                                    AlternateText="<%# Bind('Title') %>" />
                        </a>
                    </div>
                    <div class="caption">
                        <a href='/Pages/PhotoDetail.aspx?ID=<%# Eval("ID") %>'>
                        <asp:Label ID="TitleLabel" runat="server" Text="<%# Bind('Title') %>" /><br />
                        (by <asp:Label ID="MemberFullNameLabel" runat="server" Text="<%# Bind('MemberFullName') %>" />)
                        </a>
                    </div>
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server" class="listView">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="0">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server">
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
        </asp:ListView>
    </p>

    <p class="submitButton">
        <asp:Button ID="CreateButton" runat="server" CommandName="Create" Text="Add your photo" />
    </p>
</asp:Content>
